home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Advisor 2007 June
/
PC Advisor 2007 June.iso
/
FULL
/
OPENOFFICE
/
openoffice.exe
/
openofficeorg4.cab
/
HelloWorld.py
< prev
next >
Wrap
Text File
|
2006-11-30
|
480b
|
14 lines
# HelloWorld python script for the scripting framework
def HelloWorldPython( ):
"""Prints the string 'Hello World(in Python)' into the current document"""
#get the doc from the scripting context which is made available to all scripts
model = XSCRIPTCONTEXT.getDocument()
#get the XText interface
text = model.Text
#create an XTextRange at the end of the document
tRange = text.End
#and set the string
tRange.String = "Hello World (in Python)"
return None